{extend name="$lake_admin_layout"/}
{block name="main"}
<div class="layui-card">
    <div class="layui-card-header layui-bg-cyan">添加栏目</div>
    <div class="layui-card-body">
        <form class="layui-form" method="post">
            <div class="layui-form-item">
                <label class="layui-form-label">
                    上级栏目
                    &nbsp;<font color="red">*</font>
                </label>
                <div class="layui-input-block w500">
                    <select name="parentid" lay-verify="required">
                        <option value="0">作为一级栏目</option>
                        {volist name="parents" id="vo"}
                            <option value="{$vo.id}" {if $vo['id'] == $parentid}selected="selected"{/if}>{:htmlspecialchars_decode($vo['spacer'])} {$vo.title}</option>
                        {/volist}
                    </select>
                </div>
                <div class="layui-input-block">
                    <div class="layui-form-mid layui-word-aux">如果选择上级分类，那么新增的分类则为被选择上级分类的子分类</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">
                    所属模型
                    &nbsp;<font color="red">*</font>
                </label>
                <div class="layui-input-block w500">
                    <select name="modelid" lay-verify="required">
                        <option value=""></option>
                        {volist name="models" id="vo"}
                            <option value="{$vo.id}" >{$vo.title}</option>
                        {/volist}
                    </select>
                </div>
                <div class="layui-input-block">
                    <div class="layui-form-mid layui-word-aux">选择一个模型绑定到栏目</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">
                    栏目标识
                    &nbsp;<font color="red">*</font>
                </label>
                <div class="layui-input-block w500">
                    <input type="text" name="name" lay-verify="required" autocomplete="off" placeholder="栏目标识" class="layui-input">
                </div>
                <div class="layui-input-block">
                    <div class="layui-form-mid layui-word-aux">填写字母、数字、下划线及其组合</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">
                    标题
                    &nbsp;<font color="red">*</font>
                </label>
                <div class="layui-input-block w500">
                    <input type="text" name="title" lay-verify="required" autocomplete="off" placeholder="栏目标题" class="layui-input">
                </div>
                <div class="layui-input-block">
                    <div class="layui-form-mid layui-word-aux">栏目中文名称</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">
                    关键字
                </label>
                <div class="layui-input-block w500">
                    <input type="text" name="keywords" autocomplete="off" placeholder="关键字" class="layui-input" value="">
                </div>
                <div class="layui-input-block">
                    <div class="layui-form-mid layui-word-aux">栏目的关键字，半角逗号隔开</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">描述</label>
                <div class="layui-input-block w500">
                    <textarea name="description" placeholder="栏目的相关描述" class="layui-textarea"></textarea>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">
                    栏目类型
                    &nbsp;<font color="red">*</font>
                </label>
                <div class="layui-input-block w500">
                    <select name="type" lay-verify="required">
                        <option value="1">列表</option>
                        <option value="2">单页</option>
                    </select>
                </div>
                <div class="layui-input-block">
                    <div class="layui-form-mid layui-word-aux">栏目的类型，目前为 列表和单页 两种</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">排序</label>
                <div class="layui-input-block w500">
                    <input type="text" name="sort" value="100" autocomplete="off" placeholder="链接排序" class="layui-input">
                </div>
                <div class="layui-input-block">
                    <div class="layui-form-mid layui-word-aux">栏目的链接排序，值越小越前</div>
                </div>
            </div>
            
            <div class="layui-form-item">
                <label class="layui-form-label">状态</label>
                <div class="layui-input-block">
                    <input type="radio" name="status" value="1" title="正常" checked>
                    <input type="radio" name="status" value="0" title="禁止">
                </div>
            </div>
            
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit="" lay-filter="formSubmit">立即提交</button>
                </div>
            </div>
        </form>
    </div>
</div>
{/block}